/**
 * 
 */
package com.rohan.apps.mileagetracker.server;

import java.lang.reflect.Method;

import com.google.web.bindery.requestfactory.server.ServiceLayerDecorator;
import com.google.web.bindery.requestfactory.shared.RequestContext;

/**
 * @author R!
 *
 */
public class MTServiceLayerDecorator extends ServiceLayerDecorator {
	@Override
	public Object createServiceInstance(
			Class<? extends RequestContext> requestContext) {
		if(!requestContext.isAnnotationPresent(UnSecured.class)){
			//secured call make sure the user is logged in
			
		}
		else
		{
			//unsecured service request
		}
		// TODO Auto-generated method stub
		return super.createServiceInstance(requestContext);
	}
	@Override
	public Object invoke(Method domainMethod, Object... args) {		
		//domainMethod.getClass().getAnnotation(UnSecured.class);
		
		return super.invoke(domainMethod, args);
	}
}
